#ifndef _SERVER_H_
#define _SERVER_H_

#include <memory>
#include <sys/signalfd.h>
#include <signal.h>
#include <event.h>

#include "dxySocket.h"
#include "singleton.hpp"
#include "Json.h"
#include "dxyevent.h"
#include "DxyThreadPool.h"
#include "task.h"
#include "rosNodeManager.h"
#include "ThreadPool.h"

namespace dxy::easyWebServer
{


void socketEventCallBack(int fd, short flag, void * arg);

class Server
{
public:
    Server();
    ~Server();

    void init();
    void start();


private:
    struct event_base *                         m_base          = nullptr;
    struct event *                              m_sockEvent     = nullptr;
    struct event *                              m_sigalEvent     = nullptr;

};


}


#endif